<template>
  <div>
    <template v-for="node in children">
      <el-submenu
        v-if="node.type === 0"
        :key="node.routeId"
        :index="String(node.routeId)"
      >
        <template #title>{{ node.description }}</template>

        <recursive-menu :children="node.children"></recursive-menu>
      </el-submenu>
      <el-menu-item v-else :key="node.routeId" :index="node.path">
        <template #title>{{ node.description }}</template>
      </el-menu-item>
    </template>
  </div>
</template>

<script>
// import New from './components/New.vue';
export default {
  name: "RecursiveMenu",
  components: {
    // New,Old,
  },
  props: {
    sampleP: {
      type: Number,
      default: 0,
    },
    children: Array,
  },
  data() {
    return {
      sampleD: "value",
    };
  },
  computed: {
    // sampleC() {
    //     return this.sampleD+'--';
    // }
  },
  created() {},
  mounted() {},
  methods: {
    sampleM() {},
  },
  watch: {
    // sampleC(newValue, oldValue) {
    //
    // }
  },
};
</script>

<!--<style scoped>-->
<style lang="scss" scoped></style>
